<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
<script type="text/javascript">
    var username=null;
    function userlogin() {
        username = $("#username").val();
    }

    function fun(action, company) {
        var d = new Date();
        $.post("/kafka_demo/tp_individual", {"userid":username,"act_time":d.getTime(),"action":action,"job_code":company},null,"json")
    }
</script>
<body>
    <div>
        <p>用户名</p>
        <input type="text" id="username">
        <button type="button" id="btn_login" onclick="userlogin()">登录</button>
    </div>

    <div>
        <ul>
            <li>
                <p>企业A</p>
                <button type="button" id="btn_click1" onclick="fun('click','companyA')">点击查看</button>
                <button type="button" id="btn_job_collect1" onclick="fun('job_collect','companyA')">收藏</button>
                <button type="button" id="btn_cv_send1" onclick="fun('cv_send','companyA')">投递简历</button>
                <button type="button" id="btn_cv_upload1" onclick="fun('cv_upload1','companyA')">上传简历</button>
            </li>
            <li>
                <p>企业B</p>
                <button type="button" id="btn_click1" onclick="fun('click','companyB')">点击查看</button>
                <button type="button" id="btn_job_collect1" onclick="fun('job_collect','companyB')">收藏</button>
                <button type="button" id="btn_cv_send1" onclick="fun('cv_send','companyB')">投递简历</button>
                <button type="button" id="btn_cv_upload1" onclick="fun('cv_upload1','companyB')">上传简历</button>
            </li>
        </ul>
    </div>
</body>
</html>